package theme

import model.enums.ThemeType
import androidx.compose.ui.graphics.Color


/**
 * @author wei kunJie
 * @date 2024/4/25 16:12:02
 */
class EasyChatTheme(themeType: ThemeType) {
    var type: ThemeType = ThemeType.Blue

    //主颜色
    var mainColor: Color

    //最左菜单选中后的背景颜色
    var leftMenuSelectedColor: Color
    var mainWhite: Color
    var mainColor2: Color
    var contextTextBg: Color
    var logoNoneContentColor: Color
    var contextTextFoursBg: Color
    var homeBgLinearGradient: List<Color>
    var homeBgRadialGradient: List<Color>
    var contextTextFoursSelfBg: Color

    init {
        type = themeType
        mainColor =
            if (themeType == ThemeType.Blue) BlueThemeColor.mainColor else PinkThemeColor.mainColor
        leftMenuSelectedColor =
            if (themeType == ThemeType.Blue) BlueThemeColor.leftMenuSelectedColor else PinkThemeColor.leftMenuSelectedColor //最左菜单选中后
        mainWhite =
            if (themeType == ThemeType.Blue) BlueThemeColor.mainWhite else PinkThemeColor.mainWhite
        mainColor2 =
            if (themeType == ThemeType.Blue) BlueThemeColor.mainColor2 else PinkThemeColor.mainColor2
        contextTextBg =
            if (themeType == ThemeType.Blue) BlueThemeColor.contextTextBg else PinkThemeColor.contextTextBg
        logoNoneContentColor =
            if (themeType == ThemeType.Blue) BlueThemeColor.logoNoneContentColor else PinkThemeColor.logoNoneContentColor
        contextTextFoursBg =
            if (themeType == ThemeType.Blue) BlueThemeColor.contextTextFoursBg else PinkThemeColor.contextTextFoursBg
        homeBgLinearGradient =
            if (themeType == ThemeType.Blue) BlueThemeColor.homeBgLinearGradient else PinkThemeColor.homeBgLinearGradient
        homeBgRadialGradient =
            if (themeType == ThemeType.Blue) BlueThemeColor.homeBgRadialGradient else PinkThemeColor.homeBgRadialGradient
        contextTextFoursSelfBg =
            if (themeType == ThemeType.Blue) BlueThemeColor.contextTextFoursSelfBg else PinkThemeColor.contextTextFoursSelfBg
    }
}

object BlueThemeColor {
    val mainColor = Color(0xFF28C1FD)
    val mainColor2 = Color(0xFFE9F2F9)
    val leftMenuSelectedColor = Color(0xFFC8E6F0)
    val mainWhite = Color(0xFFF5FAFF)
    val contextTextBg = Color(0xFFF5FAFF)
    val contextTextFoursBg = Color(0xFFD7DCE0)
    val contextTextFoursSelfBg = Color(0xFF23AADE)
    val logoNoneContentColor = Color(0xFFE0E9EF)
    val homeBgLinearGradient = listOf(Color(0xFFD5F4FF), Color(0xFFD0F3FF), Color(0xFFFFFFFF))
    val homeBgRadialGradient = listOf(Color(0xFFD9EBFF), Color(0xFFD9EBFF), Color(0x11D9EBFF))
}

object PinkThemeColor {
    val mainColor = Color(0xFFF297C2)
    val mainColor2 = Color(0xFFFEECF1)
    val leftMenuSelectedColor = Color(0xFFF0D3E3)
    val mainWhite = Color(0xFFFFF8F8)
    val contextTextBg = Color(0xFFFFF8F8)
    val contextTextFoursBg = Color(0xFFE0DADA)
    val contextTextFoursSelfBg = Color(0xFFD585AA)
    val logoNoneContentColor = Color(0xFFF4E3E8)
    val homeBgLinearGradient = listOf(Color(0xFFFFE0F1), Color(0xFFFFDEF0), Color(0xFFF6FDE9))
    val homeBgRadialGradient = listOf(Color(0xFFFFE1F1), Color(0xFFFFE1F1), Color(0x11FFE1F1))
}